package Items.Top01.Lease;

public class LittleCar extends Car{
    public LittleCar(String carNum,String brand,double rent,String model,boolean state,int seatNum){
        super(carNum,brand,rent,state,model,seatNum);
    }
    public LittleCar(){}

    @Override
    public double countRent(int days){
        double price;
        price=getRent()*days;
        if (days>7&&days<30){
            System.out.println("享受九折优惠");
            price*=0.9;
            return price;
        }else  if (days>=30&&days<=150){
            System.out.println("享受八折优惠");
            price*=0.8;
            return price;
        }else if (days>=150){
            System.out.println("享受七折优惠");
            price*=0.7;
            return price;
        }
        return price;
    }


}
